Dump AtkAction properties
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 Jun 2011 20:53:16 +0000 (16:53 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:07:59 +0000 (16:07 -0400)
Adjust expected output to match.

tests/a11y/accessibility-dump.c
tests/a11y/accessible-name.txt
tests/a11y/hello-world.txt
tests/a11y/mnemonic.txt

index aec4038e6f115b4c27344d2be96d192ac5462f88..4dbb74e0cf108bb778ec00fd1e8179a8e29d87c9 100644 (file)
@@ -297,6 +297,24 @@ dump_atk_image (AtkImage *atk_image,
   g_string_append_printf (string, "%*simage description: %s\n", depth, "", atk_image_get_image_description (atk_image));
 }
 
+static void
+dump_atk_action (AtkAction *atk_action,
+                 guint      depth,
+                 GString   *string)
+{
+  gint i;
+
+  for (i = 0; i < atk_action_get_n_actions (atk_action); i++)
+    {
+      if (atk_action_get_name (atk_action, i))
+        g_string_append_printf (string, "%*saction %d name: %s\n", depth, "", i, atk_action_get_name (atk_action, i));
+      if (atk_action_get_description (atk_action, i))
+        g_string_append_printf (string, "%*saction %d description: %s\n", depth, "", i, atk_action_get_description (atk_action, i));
+      if (atk_action_get_keybinding (atk_action, i))
+        g_string_append_printf (string, "%*saction %d keybinding: %s\n", depth, "", i, atk_action_get_keybinding (atk_action, i));
+    }
+}
+
 static void
 dump_accessible (AtkObject     *accessible,
                  guint          depth,
@@ -323,6 +341,8 @@ dump_accessible (AtkObject     *accessible,
     dump_atk_text (ATK_TEXT (accessible), depth, string);
   if (ATK_IS_IMAGE (accessible))
     dump_atk_image (ATK_IMAGE (accessible), depth, string);
+  if (ATK_IS_ACTION (accessible))
+    dump_atk_action (ATK_ACTION (accessible), depth, string);
 
   for (i = 0; i < atk_object_get_n_accessible_children (accessible); i++)
     {
index 3a753826ff23aaf5bf5595d49e52ad741482bfd2..27a4d34d4a60c0d5f4d9f1ae1fec1dd411f5b1fa 100644 (file)
@@ -16,3 +16,6 @@ window1
     default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
     image size: -1 x -1
     image description: (null)
+    action 0 name: click
+    action 1 name: press
+    action 2 name: release
index a24a9ad7d37a9bc8ecaa6c881bbb540e2e2d9e25..b9e20a3b3426a3a4c60482c561f4fbf6df1a1ad7 100644 (file)
@@ -16,3 +16,6 @@ window1
     default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
     image size: -1 x -1
     image description: (null)
+    action 0 name: click
+    action 1 name: press
+    action 2 name: release
index 8925d4193b0193ad0e61eca7c7ed6d61828f3540..acfdb78768611a25887e610f1cb2b1ffbfad69c4 100644 (file)
@@ -32,3 +32,5 @@ window1
       character count: 4
       caret offset: 0
       default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:65535,65535,65535 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
+      action 0 name: activate
+      action 0 keybinding: <Alt>e